package design.pattern.ChainOfResponsibility.iner.impl;

import lombok.Getter;

public class DefaultImplProcessor {
  
  @Getter
  private AbstractProcessor first;
  private AbstractProcessor next;
  
  public DefaultImplProcessor addLast(AbstractProcessor processor) {
    if (first != null) {
      next.setNext(processor);
      next = processor;
    } else
      next = first = processor;
    
    return this;
  }
}
